/*
 * @Author: Jone XIn
 * @Date: 2022-01-10 22:07:07
 * @LastEditTime: 2022-01-16 16:24:10
 * @Description: 
 */

'use strict'

const { MAX_CLIENT } = require('../config.json')

// 心跳消息
const HEART_MESSAGE = JSON.stringify({
    cmd: 'heart',
    content: {
        desc: "服务端在线!"
    }
})

// 收到devicePort 回复
const SYNC_MESSAGE = JSON.stringify({
    cmd: 'regist',
    content: {
        desc: "服务端收到房间信息，注册成功!",
    }
})

// 不规范请求格式回复
const ERR_MESSAGE = JSON.stringify({
    cmd: 'reply',
    content: {
        desc: "请发送正确的数据格式!"
    }
})

// 连接超出额消息
const CAPCITY_FULL = JSON.stringify({
    cmd: 'reply',
    content: {
        desc: `连接数已超过${MAX_CLIENT}`
    }
})

module.exports = {
    HEART_MESSAGE,
    SYNC_MESSAGE,
    ERR_MESSAGE,
    CAPCITY_FULL
}